package com.astoolkit.workflow.api
{
	import flash.events.IEventDispatcher;
	
	import mx.rpc.IResponder;

	public interface ISuspendableListenersRegistry
	{
		function add( 
			inTask : IWorkflowTask,
			inTarget : IEventDispatcher, 
			inType : String, 
			inHandler : Function, 
			inUseCapture : Boolean = false, 
			inPriority : uint = 0, 
			inUseWeakReference : Boolean = false ) : void;
		
		function remove(
			inTask : IWorkflowTask,
			inTarget : IEventDispatcher, 
			inType : String, 
			inHandler : Function ) : void;
		
		function createResponder( 
			inTask : IWorkflowTask, 
			inResultFunction : Function, 
			inFaultFunction : Function ) : IResponder;
		
		function addResumeCallBack( inFunction : Function ) : void;
		
		function initResumeCallBacks() : void;
		
		function invokeResumeCallBacks() : void;
		
		function clearResumeCallBack() : void;
		
		function cleanUp() : void;
	}
}